package service

import (
	"context"
	"github.com/aphasia51/website/internal/domain"
	"github.com/aphasia51/website/internal/repository"
)

type ChemicalService struct {
	repo *repository.ChemicalRepository
}

func NewChemicalService(repo *repository.ChemicalRepository) *ChemicalService {
	return &ChemicalService{
		repo: repo,
	}
}

func (svc *ChemicalService) Query(ctx context.Context, c domain.Chemical) ([]domain.Chemical, error) {
	return svc.repo.Query(ctx, c)
}

func (svc *ChemicalService) Select(ctx context.Context) ([]domain.Chemical, error) {
	return svc.repo.Select(ctx)
}
